<?php include 'home_css_js.php'; ?>
<table width="988" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <td width="9"  background="/public/images/them/t.jpg">&nbsp;</td>

        <td width="970">
            <table width="970" align="center" border="0" cellspacing="0" cellpadding="0"  >

                <?php include 'top_menu.php';?>
                <tr>
                    <td width="970"  >
                        <table width="970" border="0" cellpadding="0" cellspacing="0"  bgcolor="#FFFFFF">

                            <tr>
                                <td width="5" valign="top"  >&nbsp;</td>
                                <td width="200" valign="top"  >
                                    <div style="font-size: 1px; height: 2px;"></div>
                                    <table width="200" border="0" cellspacing="0" cellpadding="0" align="center">
                                        <tr>
                                            <td id="amdtrai" align="center"><span id="mdtrai">SẢN PHẨM</span></td>
                                        </tr>
                                    </table>
                                    <table width="200" border="0" cellspacing="0" cellpadding="0" align="center"  id="bomenu"  >
                                        <?php foreach ($aryRootCategory as $key => $value) {?>
                                        <tr>
                                            <td  width="20"  align="right">
                                                <img src="/public/images/them/cham.gif"  align="absmiddle"/>
                                            </td>
                                            <td  width="180" id="amenutrai">
                                                <a href="<?php echo $root_page;?>/danhmuc/<?php echo $value['category_id'];?>/<?php echo $value['category_name_filter'];?>.html"  id="menutrai"><?php echo $value['category_name'];?></a>
                                            </td>
                                        </tr>
                                        <?php if(isset ($arySubcategory[$value['category_id']])){?>
                                            <?php foreach ($arySubcategory[$value['category_id']]['sub_category'] as $key2 => $subCategory) {?>
                                            <tr>
                                            <td>&nbsp;</td>
                                            <td id="amenutrai2">
                                                <a id="menutrai2" href="<?php $root_page;?>/danhmuc/<?php echo $subCategory['category_id'];?>/<?php echo $subCategory['category_name_filter'];?>.html">-&nbsp;<?php echo $subCategory['category_name'];?></a>
                                            </td>
                                            </tr>
                                        <?php } ?>
                                        <?php } ?>
                                        <?php } ?>
                                    </table>
                                    <div style="font-size: 1px; height: 10px;"></div>
                                    <?php include 'product_right_support.php';?>
                                </td>
                                <td width="3" valign="top"  >&nbsp;</td>
                                <td width="100%"  valign="top">
                                    <div style="padding-right: 7px;">
                                        <div id="slider-wrapper">
                                            <div id="slider" class="nivoSlider">
                                                <?php foreach ($arySlider as $key => $value) {?>
                                                        <a target="_blank" href=""><img src="<?php echo $value['slider_image'];?>"></a>
                                                    <?php } ?>
                                            </div>
                                            <script type="text/javascript">
                                                $(window).load(function() {
                                                    $('#slider').nivoSlider();
                                                });
                                            </script>

                                        </div>
                                    </div>

                                    <div style="font-size: 1px; height: 2px;"></div>
                                    <div style="min-height: 450px;">
                                        <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" id="bochinh">
                                        <tr>
                                            <td colspan="4" id="asanpham"><span id="sanpham">SẢN PHẨM MỚI</span></td>
                                        </tr>
                                        <tr>
                                            <?php $i = 1;
                                            foreach ($aryProductNew as $key => $value) { ?>
                                                <td align="center" valign="top" width="33%"  id="bosanpham" >
                                                    <table width="100%" border="0" cellspacing="3" cellpadding="3" >
                                                        <tr>
                                                            <td valign="top"  align="center" colspan="2" height="66">
                                                                <a  href="<?php echo $root_page;?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html" id="tieude">
                                                                    <b style="text-align:center; font-weight:bold; color:#26A817; font-size:14px;"><?php echo $value['product_title'];?></b></a>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td  valign="middle" align="center"   colspan="2" height="160">
                                                                <a class="thumbnail" href="<?php echo $root_page;?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html" >
                                                                    <img src="<?php echo $value['product_main_image'];?>"  border="0"  alt="<?php echo $value['product_title'];?>" title="<?php echo $value['product_title'];?>"/>
                                                                    <span>
                                                                        <b style="text-align:center; font-weight:bold; color:#26A817; font-size:14px;"><?php echo $value['product_title'];?></b>
                                                                        <img src="<?php echo $value['product_large_image'];?>" />
                                                                    </span>
                                                                </a>
                                                            </td>
                                                        </tr>

                                                        <tr>

                                                            <td  valign="bottom"  align="center"  colspan="2">        <strong>Giá: </strong> <span id="gia">Call   </span>
                                                            </td>

                                                        </tr>
                                                        <tr>
                                                            <td valign="top"  align="center"> 
                                                                <a  href="<?php echo $root_page;?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html" id="tieude">
                                                                    <img src="/public/images/them/chitiet.gif" border="0" />
                                                                </a>
                                                            </td>
                                                            <td valign="top"  align="center"> 
                                                                
                                                                <?php if (in_array($value['product_id'], $aryOrderProductId)) { ?>
                                                                <div>
                                                                    <a href="/order/chi-tiet-gio-hang.html" title="Xem giỏ hàng" style="color: red;">Đã có trong giỏ hàng</a>
                                                                </div>
                                                                <?php }else{?>
                                                                    <div id="product_order_<?php echo $value['product_id']; ?>">
                                                                      <a id="tieude">
                                                                      <img class="cpointer" border="0" src="/public/images/them/mua.gif" onclick="MyController.addProductToShopCat('<?php echo $value['product_id'];?>','<?php echo $value['product_category_id'];?>');">
                                                                    </a>
                                                                  </div>
                                                                  <?php }?>
                                                            </td>
                                                        </tr>
                                                    </table>

                                                </td>
                                                <?php if($i%3==0){?>
                                                </tr><tr>
                                                <?php }?>
                                            <?php $i++;} ?>
                                        </tr>
                                    </table>
                                    </div>
                                </td>
                                <td width="180" valign="top"  >

                    </td>


                    <td width="5" valign="top"  >&nbsp;

                    </td>


                </tr>
            </table>
        </td>
    </tr>

    <tr>
        <td   align="center" valign="top"  >

            <?php include 'home_footer.php';?>
        </td>
    </tr>


</table>
</td>
<td width="9"  background="/public/images/them/p.jpg">&nbsp;</td>
</tr>
</table>